<?php
namespace Admin\Controller;
use Think\Controller;

class NewsController extends Controller {
	
	$News = D('News');
	
    public function read(){
    	$this->ajaxReturn($News->getNews());	
    }
	
	public function readNewsById(){
		$this->ajaxReturn($News->findNewsById($id));
	}
	
	public function create(){
    	$this->ajaxReturn($News->createNew($data));
    }
	
	public function update(){
    	$this->ajaxReturn($News->updateNew($data));
    }
	
	public function destroy(){
    	$this->ajaxReturn($News->deleteNew($ids));
    }
}